package com.hsd.entity;

import javax.persistence.*;

@Entity
@Table(name = "t_account", schema = "atm", catalog = "")
public class Account {
    private String acc;
    private Double money;

    @Id
    @Column(name = "a_acc")
    public String getAcc() {
        return acc;
    }

    public void setAcc(String acc) {
        this.acc = acc;
    }

    @Basic
    @Column(name = "a_money")
    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Account account = (Account) o;

        if (acc != null ? !acc.equals(account.acc) : account.acc != null) return false;
        if (money != null ? !money.equals(account.money) : account.money != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = acc != null ? acc.hashCode() : 0;
        result = 31 * result + (money != null ? money.hashCode() : 0);
        return result;
    }
}
